-- GENERATED SPELL FOR [Grimtotem Spirit-Shifter] --


function spell0_23593(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(11824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23593', 0, 1)
end

function spell1_23593(pUnit, Event) --@Summon Spirit Wolf,n/a--
pUnit:FullCastSpellOnTarget(43110,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23593', 8314, 1)
end

function Sorts_23593(pUnit, Event)
local choix_sorts_23593 = math.random(0, 1)
if choix_sorts_23593 == 0 then
pUnit:RegisterEvent('spell0_23593', 1, 1)
end
if choix_sorts_23593 == 1 then
pUnit:RegisterEvent('spell1_23593', 1, 1)
end
end

function mob23593_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23593', math.random(1500, 3000), 1)
end

function mob23593_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23593_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23593_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23593, 1, 'mob23593_Action')
RegisterUnitEvent(23593, 2, 'mob23593_Leave')
RegisterUnitEvent(23593, 3, 'mob23593_Kill')
RegisterUnitEvent(23593, 4, 'mob23593_Die')
